/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Client.gui;

/**
 *
 * @author Ripper
 */
public class TextEncoder 
{
    public static String decodeText(String encodedtext)
    {
        String text = "";
        for(String s: encodedtext.split(","))
        {
            text += (char)(Integer.parseInt(s));
        }
        return text;
    }
    
    public static String encodeText(String text)
    {
        String sortaencoded = "";

        for(char c: text.toCharArray())
        {
            sortaencoded += ""+((int)c) +",";
        }
        
        return sortaencoded;
    }
}
